package com.heima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.pojo.Business;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BusinessMapper extends BaseMapper<Business> {

    /**
     * 查询出所有的商圈信息
     * @return
     */
    @Select("select * from tb_business")
    List<Business> businessAll();

    @Select("select name from tb_business where id = #{businessId}")
    String queryBusinessName(Integer businessId);
}
